<?php
header("content-type:text/html;charset=utf8");
$floor=$_GET['floor'];
$con = mysqli_connect('localhost','root','root','shop');
$res = mysqli_query($con,"select * from scenics where isshowindex=$floor");
$arr=[];
while($row = mysqli_fetch_assoc($res)){
    $arr[]=$row;
};
if(count($arr)){
    echo json_encode([
        "meta"=>[
            "status"=>1,
            "msg"=>"获取成功"
        ],
        "data"=>$arr
    ]);
}else{
    echo json_encode([
        "meta"=>[
            "status"=>2,
            "msg"=>"获取失败"
        ],
        "data"=>null
    ]);
};